﻿<%@ Page Title="" Language="C#" MasterPageFile="~/mypage/MypageMasterPage.master" AutoEventWireup="true" CodeBehind="edit_profile_01.aspx.cs" Inherits="Com.Web.coffinegurunaru.mypage.edit_profile_01" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="33">&nbsp;</td>
            </tr>
            <tr>
              <td><img src="/images/mypage/tit_04.gif" width="360" height="49"></td>
            </tr>
            <tr>
              <td height="30">&nbsp;</td>
            </tr>
          <tr>
            <td align="left"><table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="2" bgcolor="#7a2888"><img src="/images/common/clear.gif" width="1" height="1"></td>
              </tr>
            </table>
              <table border='1' cellpadding='0' cellspacing='0' width='98%' style='border-collapse:collapse' bordercolor='#cdcdcd' frame='void'>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_17.gif" width="101" height="15"></td>
                    <td>
					  <input type="radio" name="n1GroupType" id="n1GroupType2" value="2" <%=UserInfo.GroupType == 2 ? "checked='checked'" : "" %>>
                      <label for="n1GroupType2">일반회원</label>
                      <input type="radio" name="n1GroupType" id="n1GroupType3" value="3" <%=UserInfo.GroupType == 3 ? "checked='checked'" : "" %>>
                      <label for="n1GroupType3">가맹점 회원</label>
                    </td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_11.gif" width="68" height="15"></td>
                    <td>
                      <input type='password' name='strUserPWD1' id="strUserPWD1" maxlength='20' size='10' value=''>
                    영문/숫자 조합으로 8~16자리. 첫글자는 영문자로 사용</td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_12.gif" width="68" height="15"></td>
                    <td>
                      <input type="password" name="strUserPWD2" id="strUserPWD2" maxlength='20' size='10' value=''></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_08.gif" width="68" height="15"></td>
                    <td>
                     <input type='text' name='strUserName' id='strUserName' size='15' maxlength='15' value='<%=UserInfo.UserName %>'>
                     </td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_19.gif" width="101" height="15"></td>
                    <td>
                      <select name='n1Question' id='n1Question'>
                        <option value='' <%=UserInfo.Question == 0 ? "selected='selected'" : ""%>>========선택========</option>
                        <option value='1' <%=UserInfo.Question == 1 ? "selected='selected'" : ""%>>기억에 남는 추억의 장소는?</option>
                        <option value='2' <%=UserInfo.Question == 2 ? "selected='selected'" : ""%>>자신의 인생 좌우명은?</option>
                        <option value='3' <%=UserInfo.Question == 3 ? "selected='selected'" : ""%>>자신의 보물 제1호는?</option>
                        <option value='4' <%=UserInfo.Question == 4 ? "selected='selected'" : ""%>>가장 기억에 남는	선생님 성함은?</option>
                        <option value='5' <%=UserInfo.Question == 5 ? "selected='selected'" : ""%>>타인이 모르는	자신만의 신체비밀이 있다면?</option>
                        <option value='6' <%=UserInfo.Question == 6 ? "selected='selected'" : ""%>>추억하고 싶은 날짜가 있다면?</option>
                        <option value='7' <%=UserInfo.Question == 7 ? "selected='selected'" : ""%>>받았던 선물 중 기억에 남는	독특한 선물은?</option>
                        <option value='8' <%=UserInfo.Question == 8 ? "selected='selected'" : ""%>>유년시절 가장	생각나는 친구 이름은?</option>
                        <option value='9' <%=UserInfo.Question == 9 ? "selected='selected'" : ""%>>인상깊게 읽은 책	이름은?</option>
                        <option value='10' <%=UserInfo.Question == 10 ? "selected='selected'" : ""%>>읽은	책 중에서 좋아하는 구절이 있다면?</option>
                        <option value='11' <%=UserInfo.Question == 11 ? "selected='selected'" : ""%>>자신이 두 번째로 존경하는 인물은?</option>
                        <option value='12' <%=UserInfo.Question == 12 ? "selected='selected'" : ""%>>친구들에게 공개하지 않은 어릴적 별명이 있다면?</option>
                        <option value='13' <%=UserInfo.Question == 13 ? "selected='selected'" : ""%>>초등학교 때 기억에 남는 짝꿍 이름은?</option>
                        <option value='14' <%=UserInfo.Question == 14 ? "selected='selected'" : ""%>>다시 태어나면	되고 싶은 것은?</option>
                        <option value='15' <%=UserInfo.Question == 15 ? "selected='selected'" : ""%>>내가	좋아하는 캐릭터는?</option>
                        <option value='16' <%=UserInfo.Question == 16 ? "selected='selected'" : ""%>>나의 주민등록번호	끝자리는?</option>
                      </select>
                      </td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="32"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="150"><img src="/images/member/txt_20.gif" width="101" height="15"></td>
                    <td>
                      <input type='text' name='strAnswer' id='strAnswer'  size='25' maxlength='25' value='<%=UserInfo.Answer %>'>
                     </td>
                  </tr>
                </table></td>
              </tr>
              </table>
              <table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="2" bgcolor="#7a2888"><img src="/images/common/clear.gif" width="1" height="1"></td>
              </tr>
            </table>
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td height="40" align="center"><a href="#" id="btnUserSave"><img src="/images/mypage/bt_edit.gif" width="69" height="26"></a> <a href="/" id="btnUserCancle"><img src="/images/franchise/bt_cancle.gif" width="54" height="26"></a></td>
                </tr>
              </table>
              
              </td>
            </tr>
          </table>


<script language="javascript" type="text/javascript">
(function($) {
	$.UserModify = {};
	
	$.UserModify = {
		Init : function() {
			$("#n1GroupType2").click(function() {
				$("#n1GroupType3").attr("checked", "checked");
				return false;
			});
			
			$("#btnSave").click(function() {
				$.UserModify.Submit();
			});
			
		},

		
		Submit : function() {
			if ( $("#strUserID2").val() == "") {
				alert( "아이디 중복확인을 해주세요");
				return;
			}
			
			if ( $("#strUserPWD1").val() == "") {
				alert( "비밀번호를 입력해주세요");
				return;
			}
			
			if ( $("#strUserPWD1").val().length < 4) {
				alert( "비밀번호는 4글자 이상입니다.");
				return;
			}
			
			if (!$.Coffine.isEngNumber( $("#strUserPWD1").val() ) ) {
				alert( "비밀번호는 영문과 숫자로만 입력해주세요");
				return;
			}
			
			if ($("#strUserPWD1").val() != $("#strUserPWD2").val() ) {
				alert( "비밀번호가 틀립니다.");
				return;
			}
			
			if ($("#strUserName").val() == ""  ) {
				alert( "성명을 입력해주세요.");
				return;
			}
			
			if ($("#n1Question").val() == "") {
				alert( "질문을 선택해주세요.");
				return;
			}
			
			if ($("#strAnswer").val() == "") {
				alert( "답변을 입력해주세요.");
				return;
			}
			
			$("form:eq(0)").submit();
			return false;
		}
	}
	
	$(function() {
		$.UserModify.Init();
	});
})(jQuery);
</script>

</asp:Content>
